1. The Field of the Invention
This invention relates generally to reducing motion artifacts and noise in video image processing, and more particularly, to a method and apparatus by which video images are filtered on a per pixel basis over time, from frame to frame.
2. The Background Art
It is known in the art to reduce noise in video images by filtering digital data (that represents each frame of the video images) with a temporal filter (also known as a xe2x80x9crecursive filterxe2x80x9d). A temporal filter can be realized through hardware or software, with hardware realizations commonly implementing multiplier or a look up table for holding the data representative of the gain coefficients of pixel difference values. Pixel difference values are the difference between a pixel value from one frame to the next, the pixel value being a set of bits from the digital data of one frame. A temporal filter performs noise reduction by operating on each single pixel in the frame or array, storing pixel values of each single pixel for each video frame over time, determining the difference between a pixel value of the pixel in the current or incoming frame and the pixel value of the pixel in the immediately previous or filtered fame, adding a portion of this difference value to the pixel value (dependent on the filter or gain coefficients) to the pixel value of the immediately previous or filtered frame to obtain a new filtered pixel value for each pixel in the frame, storing and displaying or outputting the new pixel value. The amount of the difference value added to the pixel value of the immediately previous frame is a fractional part of the difference value and is determined through operator choice. For example, an operator could select four frames of averaging which would cause the amount added to the pixel value of the immediately previous frame to be 0.25 (or xc2xc) of the difference value. If an operator selects eight frames of averaging that would cause the amount added to the pixel value of the immediately previous frame to be 0.124 (or xe2x85x9) of the difference value. Thus, the greater the averaging level applied, the smaller fraction of the difference value is added to the previous pixel value. In other words, temporal filtering is a running average of the incoming pixel values.
The drawback of simple temporal filters is that they are unable to distinguish between noise and motion in a live image, so filtering occurs whether the changes in pixel difference values are caused by undesirable noise or acceptable motion. When averaging occurs for pixel difference values created as a result of motion, the filtered video image has a smearing or blurring where the motion occurs. Thus, in an effort to reduce noise, temporal filters undesirably reduce the clarity of moving images.
In view of the foregoing, it would be desirable to provide a filter that adjusts the amount of filtering according to the amount of motion in the video image.
It is an object of the present invention to provide a method and apparatus for obtaining improved video images with reduced motion artifacts and reduced noise.
It is another object of the invention to provide a method and apparatus for decreasing the amount an image is filtered when the image is moving or a portion of the image is moving. Reducing the temporal filtering when the image is moving reduces the smearing or blurring in the moving portion of the image and maintains good noise filtering of the non-moving portion of the image.
It is another object of the invention to provide such a method and apparatus for maximizing filtering of noise from stationary images or portions of an image.
The above objects and others not specifically recited are realized through a method and apparatus for reducing noise in pixels of a displayed video image by filtering pixel values of the pixels of the video image based on a first frame having currently filtered pixel values and a second frame having recently captured but not yet filtered pixel values. One illustrative method includes the steps of:
(a) storing in memory digital data representing the filtered value or (after the first cycle) filtered values of the image for each pixel in the frame, each pixel having a pixel value represented by a set of bits of the digital data;
(b) capturing digital data representing values of the image for each pixel in the second or subsequent frames, each pixel having an unfiltered pixel value represented by a set of bits of the digital data;
(c) selecting, based on scanning techniques, a pixel of interest from among the pixels in the video image;
(d) computing difference values of both (i) the selected pixel or pixel of interest and (ii) the pixels of a matrix or kernel surrounding the pixel of interest, the difference values each being the difference between the initial or filtered pixel value of a pixel in the stored frame and the incoming or unfiltered pixel value of the same pixel location in the next frame;
(e) averaging the difference values of the pixels in the matrix or kernel surrounding the pixel of interest (a spatial filter) to obtain a motion value with the noise filtered down;
(f) computing the filtering level for the pixel of interest in the frame or array, based on the amount of filtering desired and according to the motion value associated with each pixel of interest. Multiply this filtering level times the pixel of interest value; and
(g) adding this computed pixel of interest value to the initial or filtered value of the stored image to become the new filtered value of the stored image.
This temporal (recursive) and motion filter process is to be completed for each of the unfiltered incoming pixel values of the incoming frame image.
The new filtered pixel values will then be displayed or output as the processed image. Thus, a new frame of digital data representing filtered pixel values is produced in place of the unfiltered pixel values of the second frame. This new frame is output or displayed and the whole process repeats for the next frame of unfiltered pixel values.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by the practice of the present invention. The objects and advantages of the invention may be realized and obtained by means of the instruments and combinations particularly claimed in the appended claims.